// ApplicationsManager.h : main header file for the Application
//
#pragma once

// CApplicationsManager:
// See ApplicationsManager.cpp for the implementation of this class
//
#include "Singleton.h"
#include "Application.h"
#include "WinApplication.h"
#include "ApplicationAccounts.h"
#include "Account.h"
#include "GList.h"


class CApplicationsManager : public Singleton<CApplicationsManager>
{
	friend class Singleton<CApplicationsManager>;

public:
	CApplicationsManager();
	~CApplicationsManager();
	

private:
	GList* m_winApplicationList;
	GList* m_applicationAccountsList;

public:
	CWinApplication& GetWinApplicationByName(CString nWinAppName);
	CWinApplication& GetWinApplicationByWindowTitle(CString nWinTitle);
	CAccount& GetAccountById(CString nIdAccount);
	GList* GetAccountListByAppName(CString nAppName);
	GList* GetWinAppList();
	GList* GetApplicationAccountsList();
	void LoadApplicationsFromRepository(CString nRepository);
	void LoadApplicationAccountsFromRepository(CString nRepository);
};